home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14445 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: news.NetVision.net.il!news
  2. From: ggil@netvision.net.il
  3. Newsgroups: comp.lang.c
  4. Subject: Re: How to detect EOF?/filepointer problem.
  5. Date: Sun, 14 Apr 96 23:44:07 PDT
  6. Organization: NetVision LTD.
  7. Message-ID: <NEWTNews.829550737.4541.ggil@dialup.netvision.net.il>
  8. References: <316F8932.2BAF@www.partio.fi>
  9. NNTP-Posting-Host: ts008p14.pop9a.netvision.net.il
  10. Mime-Version: 1.0
  11. Content-Type: TEXT/PLAIN; charset=US-ASCII
  12. X-Newsreader: NEWTNews & Chameleon -- TCP/IP for MS Windows from NetManage
  13.  
  14.  
  15. In Article<316F8932.2BAF@www.partio.fi>, <ralph@www.partio.fi> writes:
  16. > Path: 
  17. news.NetVision.net.il!psinntp!psinntp!psinntp!howland.reston.ans.net!newsfeed.i
  18. nternetmci.com!in2.uu.net!nntp.inet.fi!news.funet.fi!news.kolumbus.fi!usenet
  19. > From: "R.K.Brand" <ralph@www.partio.fi>
  20. > Newsgroups: comp.lang.c
  21. > Subject: How to detect EOF?/filepointer problem.
  22. > Date: Sat, 13 Apr 1996 04:00:02 -0700
  23. > Organization: Kolumbus Information Network, Finnet Group
  24. > Lines: 24
  25. > Message-ID: <316F8932.2BAF@www.partio.fi>
  26. > NNTP-Posting-Host: kasav6.kauniainen.fi
  27. > Mime-Version: 1.0
  28. > Content-Type: text/plain; charset=us-ascii
  29. > Content-Transfer-Encoding: 7bit
  30. > X-Mailer: Mozilla 2.0 (Win16; I)
  31. > Sorry to bother you, but I have a problem 
  32. > while scanning through a file too see whether 
  33. > or not a certain word occurs.
  34. > When I run out of file, fscanf() keeps 
  35. > returning the last line, instead of some NULL 
  36. > value I would find logical (but who am I?).
  37. > How can I test for the end of the file?
  38.  
  39. If you use fgets() instead you may avoid many problems
  40. ( it returns NULL on EOF )
  41.  
  42. Gil Gilad
  43. ggil@netvision.net.il
  44.  
  45.  
  46.